<?php
/**
 * Created by PhpStorm.
 * Author: kaodou
 * Date: 2017/10/27
 */
namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;

class CategoryRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Category\Controllers', 'prefix' => 'category'], function ($router) {

            $router->any('child-list', 'CategoryController@childList');
            $router->any('tree-list', 'CategoryController@getTreeCategoryList');
            //$router->any('/add/', 'CategoryController@addCategory');
            $router->any('del', 'CategoryController@deleteCategory');
            $router->any('edit', 'CategoryController@editCategory');
            $router->any('with-product', 'CategoryController@getChildCategoryListWithProductList');
            $router->any('fields', 'CategoryController@getFieldsList');

            //材料分类列表,已二级联动形式返
            $router->any('all', 'IndexController@all');
            $router->any('add', 'IndexController@add');

        });
    }
}